import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path:'/',

      component: () => import('@/views/RoomModel/Show.vue'),
    },
    {
      path:'/add',

      component: () => import('@/views/RoomModel/Add.vue'),
    },
    {
      path:'/login',

      component: () => import('@/views/RoomModel/Login.vue'),
    },
    {
      path:'/update',

      component: () => import('@/views/RoomModel/Update.vue'),
    },
    {
      path:'/typeshou',

      component: () => import('@/views/RoomType/TypeShou.vue'),
    },
    {
      path:'/typeadd',

      component: () => import('@/views/RoomType/TypeAdd.vue'),
    },
    {
      path:'/typeupdate',

      component: () => import('@/views/RoomType/TypeUpdate.vue'),
    },
    {
      path:'/numshow',

      component: () => import('@/views/RoomNumber/NumShow.vue'),
    }
    ,
    {
      path:'/numadd',

      component: () => import('@/views/RoomNumber/NumAdd.vue'),
    }
  ],
})

export default router
